package org.halk.redis.lock.exception;

import lombok.Data;
import org.springframework.http.HttpStatus;

/**
 * 自定义异常
 *
 * @Author halk
 * @Date 2021/12/24 15:38
 * @desc
 */
@Data
public class CustomException extends RuntimeException {

    private String message;
    private HttpStatus httpStatus = HttpStatus.INTERNAL_SERVER_ERROR;

    public CustomException(String message) {
        this.message = message;
    }

    public CustomException(String message, HttpStatus httpStatus) {
        this.message = message;
        this.httpStatus = httpStatus;
    }

    public CustomException(String message, Throwable e) {
        this.message = message;
    }

    public CustomException(String message, HttpStatus httpStatus, Throwable e) {
        this.message = message;
        this.httpStatus = httpStatus;
    }


}
